package cc.mrbird.febs.accounting.service;

import cc.mrbird.febs.accounting.dto.detailCost.DetailCostDTO;
import cc.mrbird.febs.accounting.dto.detailCost.DetailCostParam;
import cc.mrbird.febs.accounting.dto.importAndExport.ExportParam;
import cc.mrbird.febs.accounting.dto.importAndExport.ImportDataDTO;
import cc.mrbird.febs.accounting.dto.importAndExport.ImportExcelData;
import cc.mrbird.febs.accounting.dto.importAndExport.ImportParam;
import cc.mrbird.febs.accounting.dto.standardSub.ExportFlagDTO;
import cc.mrbird.febs.accounting.dto.standardSub.SingleExportDTO;
import cc.mrbird.febs.accounting.entity.*;

import cc.mrbird.febs.common.entity.QueryRequest;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import org.apache.poi.xssf.usermodel.XSSFWorkbook;

import java.io.IOException;
import java.io.InputStream;
import java.util.List;
import java.util.Map;

/**
 *  Service接口
 *
 * @author baoyinlei
 * @date 2021-09-28 23:27:01
 */
public interface IDetailCostService extends IService<DetailCost> {

    List<DetailCost> findDetailCosts();

    Map<String, Object> queryDetailCost(Long companyId, Long projectId, String yearMonth);

    List<DetailCost> queryByType(Integer type);

    List<DetailCost> queryByProjectsAndYearMonths(List<String> projectIds, List<String> yearMonths, String ifEstimate);

    void saveDetailCost(DetailCostParam detailCostParam);

    List<DetailCostDTO> queryDetailCostByYearMonth(Long companyId, Long projectId, String yearMonth);


    ExportFlagDTO queryDetailForExcel(Long companyId, Long projectId, String year, List<String> yearMonths);

    void fillingField(List<SingleExportDTO> singleExportDTOS,Long projectId, List<String> yearMonths);

    List<SingleExportDTO> querySubjectDetail();

    // 导入excel
    ImportExcelData importExcel(InputStream inputStream, ImportParam importParam) throws IOException;

    // 主表导出
    void exportMainTable(XSSFWorkbook workbook, ExportParam exportParam) throws IOException;
}
